package controllers

import (
	"github.com/astaxie/beego"
)

type ApiController struct {
	beego.Controller
}

var apiMapping = make(map[string]string)

func init() {
	apiMapping["version"] = "v1.0"
	apiMapping["author"] = "805447391@qq.com"
	apiMapping["simple_json"] = `
{"ID":"20141113027", "Name":"王福迎", "Info":"Your Father !"}`
}

func (c *ApiController) Get() {
	tag := c.Ctx.Input.Param(":tag")
	c.Ctx.WriteString(apiMapping[tag])
}
